/*
 * View.java
 *
 * Created on September 16, 2006, 11:58 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package tagcapturer;

import javax.swing.table.*;

/**
 *
 * @author Anthony Lam
 */
public class View {

    static final int CURRENT=0;
    static final int ADDITIONS=1;
    static final int DELETIONS=2;
    
    private String title;
    private String readers;
    private String includeTags;
    private int reportSet;
    private TableModel tableModel;
    private boolean alarm;
    private boolean epcisEnabled;
            
    /** Creates a new instance of View */
    public View() {
        setTableModel(new DefaultTableModel(new Object [][] {}, new String [] {"Tag ID", "Status", "Time", "Reader", "Description", "History", "EPCIS Status"}){
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };
           
            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
            
            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });        
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getReaders() {
        return readers;
    }

    public void setReaders(String readers) {
        this.readers = readers;
    }

    public String getIncludeTags() {
        return includeTags;
    }

    public void setIncludeTags(String includeTags) {
        this.includeTags = includeTags;
    }

    public int getReportSet() {
        return reportSet;
    }

    public void setReportSet(int reportSet) {
        this.reportSet = reportSet;
    }

    public TableModel getTableModel() {
        return tableModel;
    }

    public void setTableModel(TableModel tableModel) {
        this.tableModel = tableModel;
    }

    public boolean isAlarm() {
        return alarm;
    }

    public void setAlarm(boolean alarm) {
        this.alarm = alarm;
    }
    
    public boolean isEpcisEnabled() {
        return epcisEnabled;
    }

    public void setEpcisEnabled(boolean epcisEnabled) {
        this.epcisEnabled = epcisEnabled;
    }
}
